fix: Added build cache path for symbol upload when targeting Switch#2580
fix: Added build cache path for symbol upload when targeting Switch#2580bitsandfoxes wants to merge 2 commits intomainfrom
Conversation
Semver Impact of This PR🟢 Patch (bug fixes) 📋 Changelog PreviewThis is how your changes will appear in the changelog. Bug Fixes 🐛
Internal Changes 🔧Deps
🤖 This preview updates automatically when you update the PR. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix prepared fixes for both issues found in the latest run.
- ✅ Fixed: AddPath call missing required arguments
- Changed AddPath(beePath) to AddPath(paths, beePath, logger) to provide all required arguments
- ✅ Fixed: Bee cache path uses wrong base directory
- Changed buildOutputDir to projectDir when constructing the Bee cache path since Library folder is at project root
Or push these changes by commenting:
@cursor push 6955aa6806
Preview (6955aa6806)
diff --git a/src/Sentry.Unity.Editor/Native/BuildPostProcess.cs b/src/Sentry.Unity.Editor/Native/BuildPostProcess.cs
--- a/src/Sentry.Unity.Editor/Native/BuildPostProcess.cs
+++ b/src/Sentry.Unity.Editor/Native/BuildPostProcess.cs
@@ -322,8 +322,8 @@ private static void UploadDebugSymbols(IDiagnosticLogger logger, BuildTarget tar
}
// When exporting as an NSP the assemblies are bundled inside the package. So we're also checking the build cache.
- var beePath = Path.Combine(buildOutputDir, "Library", "Bee", "artifacts", "SwitchPlayerBuildProgram");
- AddPath(beePath);
+ var beePath = Path.Combine(projectDir, "Library", "Bee", "artifacts", "SwitchPlayerBuildProgram");
+ AddPath(paths, beePath, logger);
// User-provided Sentry plugin
AddPath(paths, Path.GetFullPath("Assets/Plugins/Sentry/"), logger);
@@ -322,8 +322,8 @@ private static void UploadDebugSymbols(IDiagnosticLogger logger, BuildTarget tar
}
// When exporting as an NSP the assemblies are bundled inside the package. So we're also checking the build cache.
- var beePath = Path.Combine(buildOutputDir, "Library", "Bee", "artifacts", "SwitchPlayerBuildProgram");
- AddPath(beePath);
+ var beePath = Path.Combine(projectDir, "Library", "Bee", "artifacts", "SwitchPlayerBuildProgram");
+ AddPath(paths, beePath, logger);
// User-provided Sentry plugin
AddPath(paths, Path.GetFullPath("Assets/Plugins/Sentry/"), logger);This Bugbot Autofix run was free. To enable autofix for future PRs, go to the Cursor dashboard.
|
|
||
| // When exporting as an NSP the assemblies are bundled inside the package. So we're also checking the build cache. | ||
| var beePath = Path.Combine(buildOutputDir, "Library", "Bee", "artifacts", "SwitchPlayerBuildProgram"); | ||
| AddPath(beePath); |
There was a problem hiding this comment.
AddPath call missing required arguments
High Severity
AddPath(beePath) is called with a single string argument, but the only AddPath overload in this class requires (List<string> paths, string path, IDiagnosticLogger logger, bool required = false). Every other call site uses AddPath(paths, somePath, logger). The paths list and logger arguments are missing, so the Bee cache path won't be added for symbol upload — which is the entire purpose of this PR.
| } | ||
|
|
||
| // When exporting as an NSP the assemblies are bundled inside the package. So we're also checking the build cache. | ||
| var beePath = Path.Combine(buildOutputDir, "Library", "Bee", "artifacts", "SwitchPlayerBuildProgram"); |
There was a problem hiding this comment.
Bee cache path uses wrong base directory
High Severity
The Bee build cache path is constructed relative to buildOutputDir (e.g., ./builds/switch/), but Library/Bee/artifacts/SwitchPlayerBuildProgram lives under the Unity project root. The base directory here likely needs to be projectDir (defined at line 168 from Application.dataPath) instead of buildOutputDir, otherwise the path will point to a non-existent location.



When exporting an actual rom the assemblies are bundled inside the package, causing the symbol upload to fail.